[codex] Bound historical log replay memory#3425
Open
domjancik wants to merge 1 commit into
Open
Conversation
564aa97 to
690b75c
Compare
690b75c to
1ccd82e
Compare
1ccd82e to
62cf34f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This bounds historical conversation replay and removes two follow-on server allocation paths hit while reproducing the reported workspace/session crash.
Vec.MsgStorehistory.VK_DISABLE_PR_MONITOR=1for local deployments so repro runs can disable background PR polling/fetching when GitHub/network is unavailable.VK_SERVE_FRONTEND_SOURCE_MAPS=1is set.VK_DISABLE_AUTO_OPEN_BROWSER=1andVK_TRACE_FRONTEND_ASSETS=1diagnostic gates for local server repro runs.Root cause
The original latest-session crash was caused by historical log replay loading large saved process logs through multiple full server-side copies before streaming them to the browser.
While reproducing the exact workspace/session again, two additional allocation paths showed up:
/api/workspaces/summariesis polled by the frontend and previously computed diff counts by materializing fullDiffobjects, including file contents, for every workspace in parallel.assets/index-BKQdPAfe.js.map. That file is about 24 MB inpackages/local-web/dist, and serving it through the embedded frontend route plus compression caused the server to attempt another ~21 MB allocation and crash.Validation
pnpm run formatpnpm --filter @vibe/web-core run checkcargo test -p utils bounded_history_keeps_recent_messages_under_limitcargo test -p utils oversized_message_is_broadcast_but_not_retainedcargo test -p git parse_numstat_counts_text_and_binary_filescargo check -p services -p utilscargo check -p local-deployment -p services -p utilswith corrected bindgen argscargo check -p git -p services -p server -p local-deploymentwith corrected bindgen argscargo check -p serverafter the frontend asset serving changeshttp://localhost:13334withVK_SHARED_API_BASE=http://localhost:13000,VK_DISABLE_PR_MONITOR=1, andVK_DISABLE_AUTO_OPEN_BROWSER=1.GET /api/info, the target page/workspaces/76d071e2-15c5-46bc-ab8b-24f1e58bc562?session=3cd570c0-d9f6-421b-b9b1-e095bce3bfa9, and active/archived/api/workspaces/summariesall return 200.assets/index-BKQdPAfe.js.mapreturns 404 by default and logsFrontend source map request blocked.Notes:
LIBCLANG_PATH=C:\tmp\llvm-minimal\binandBINDGEN_EXTRA_CLANG_ARGS=-isystemC:/Users/magne/utils/Tooll-v3.9.3/lib/clang/14.0.0/include. The no-space-isystem...form matters;-isystem C:/...failed to locatestdarg.hin this build.cargo test -p utilsalso hits an unrelated existing Windows path assertion inpath::tests::test_make_path_relative; the newMsgStoretests pass individually.